from django.db import models
from task_manage_sys.mixins import BaseModelMixin


# Create your models here.
class Stage(BaseModelMixin):
    name = models.CharField(max_length=100, db_comment="阶段名", db_index=True)

    class Meta:
        db_table = 'tb_stage'


class Module(BaseModelMixin):
    name = models.CharField(max_length=100, db_comment="模块名", db_index=True)

    stage = models.ForeignKey(to=Stage, on_delete=models.CASCADE, blank=True, null=True, related_name="modules")

    class Meta:
        db_table = 'tb_module'
